/*
 * ViewAST.java
 *
 * Created on March 1, 2007, 11:53 PM
 *
 * (C) R. Alexander Milowski alex@milowski.com
 */

package parser;

import com.smallx.xpath.parser.Expression;
import com.smallx.xpath.parser.XPathParser;
import org.infoset.xml.XMLException;

/**
 *
 * @author R. Alexander Milowski
 */
public class ViewAST {
   
   /** Creates a new instance of ViewAST */
   public ViewAST() {
   }
   
   public static void main(String [] args) {
      XPathParser parser = new XPathParser();
      for (int i=0; i<args.length; i++) {
         try {
            parser.setExpression(args[i]);
            Expression expr = parser.parseExpr();
            System.out.println(expr.toString());
         } catch (XMLException ex) {
            ex.printStackTrace();
         }
      }
   }
   
}
